<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>资产添加页面</title>
  <link rel="stylesheet" href="../../../yl/index.css" />
  <!-- 布局样式 -->
  <link rel="stylesheet" href="../../../yl/style.css">
  <link rel="stylesheet" href="../../../yl/mobile.css" />
  <link rel="stylesheet" href="../../../yl/easyui.css" />
  <link rel="stylesheet" href="../../../yl/icon.css" />
</head>

<body>
  <!-- <div id="app"> -->
  <div class="easyui-navpanel" id="app" v-cloak>
    <header>
      <div class="m-toolbar">
        <div class="m-title">{{action=='Add'?'添加资产信息':action=='Modify'?'修改资产信息':''}}</div>
      </div>
    </header>
    <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
      id="MainTable" ref="MainTable"
      :data-options="JSON.stringify({ 'TableName': 'asset_management', 'form': 'dataForm' ,'primary_key':'Asset_SerialNumber' })">
      <div class="yl-main">
        <div class="table_titel">
          <div class="titel">资产信息</div>
        </div>
        <el-descriptions :column="1" size="large" border>
          <el-descriptions-item>
            <template #label>
              <div class="cell-item">资产名称</div>
            </template>
            <el-input ref="personal_information" v-model="dataForm.Asset_Name" class="borderless-input"
              placeholder="请输入资产名称" />
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <div class="cell-item">资产类别</div>
            </template>
            <el-select clearable v-model.trim="dataForm.Asset_Category_SerialNumber" placeholder="请选择资产类别" filterable
              style="width: 100%">
              <el-option v-for="(item,index) in category" :key="index" :label="item.Asset_Category"
                :value="item.Asset_Category_SerialNumber"></el-option>
            </el-select>
          </el-descriptions-item>


          <el-descriptions-item>
            <template #label>
              <div class="cell-item">村委会</div>
            </template>
          
              <el-cascader @change="changeVillage" class="borderless-input" v-model="dataForm.Village_SerialNumber"
                filterable :props="{ emitPath: false,
                          value: 'ProvinceNumber', 
                          label: 'Province',
                          children: 'children',checkStrictly: false }" placeholder="请选择村委会"
                :options="village" style="width: 100%"></el-cascader>


   
            
          </el-descriptions-item>


          <!-- <el-descriptions-item>
            <template #label>
              <div class="cell-item">村委会</div>
            </template>
            <el-select @change="changeVillage" clearable v-model.trim="dataForm.Village_SerialNumber"
              placeholder="请选择村委会" filterable style="width: 100%">
              <el-option v-for="(item,index) in village" :key="index" :label="item.Village"
                :value="item.VillageNumber"></el-option>
            </el-select>
          </el-descriptions-item> -->


          <el-descriptions-item>
            <template #label>
              <div class="cell-item">村集体</div>
            </template>
            <el-select :disabled="!dataForm.Village_SerialNumber" clearable
              v-model.trim="dataForm.Village_Collective_SerialNumber" placeholder="请选择村集体" filterable
              style="width: 100%">
              <el-option v-for="(item,index) in village_Collective" :key="index" :label="item.Org_Name"
                :value="item.Village_Collective_SerialNumber"></el-option>
            </el-select>
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <div class="cell-item">资产规格</div>
            </template>
            <el-input v-model="dataForm.Specification" class="borderless-input" placeholder="请输入资产规格" />
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <div class="cell-item">获得日期</div>
            </template>
            <el-date-picker v-model="dataForm.Acquisition_Date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
              class="borderless-input" type="date" placeholder="请选择获得日期" size="large"></el-date-picker>
          </el-descriptions-item>

          

          <el-descriptions-item>
            <template #label>
              <div class="cell-item">用途</div>
            </template>
            <el-select clearable v-model.trim="dataForm.Usage_Type" placeholder="请选择用途" filterable style="width: 100%">
              <el-option v-for="(item,index) in ['自用','出租']" :key="index" :label="item" :value="item"></el-option>
            </el-select>
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <div class="cell-item">折旧方式</div>
            </template>
            <el-input v-model="dataForm.Depreciation_Method" class="borderless-input" placeholder="请输入折旧方式" />
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <div class="cell-item">使用年限</div>
            </template>
            <el-input v-model="dataForm.Useful_Life" class="borderless-input" placeholder="请输入使用年限" />
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <div class="cell-item">当前价值（元）</div>
            </template>
            <el-input @change="handleChangeCurrent_Value" v-model="dataForm.Current_Value" class="borderless-input" placeholder="请输入当前价值（元）" />
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <div class="cell-item">残值</div>
            </template>
            <el-input disabled v-model="dataForm.Acquisition_Price" class="borderless-input"  />
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <div class="cell-item">存放地点</div>
            </template>
            <el-input v-model="dataForm.Location" class="borderless-input" placeholder="请输入存放地点" />
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <div class="cell-item">保管人</div>
            </template>
            <el-select clearable v-model.trim="dataForm.Custodian_SerialNumber" placeholder="请选择保管人" filterable
              style="width: 100%">
              <el-option v-for="(item,index) in personal_information" :key="index" :label="item.Personal_Name"
                :value="item.ID_Card_Number"></el-option>
            </el-select>
          </el-descriptions-item>
        </el-descriptions>
        <!-- <div id="ChildTable">
          <div class="table_titel">
            <div class="titel">资产变动初始化</div>
            <div class="operation">
              <el-button type="primary" size="small" @click="handleAdd('childDataForm')">新增</el-button>
              <el-button type="danger" size="small" @click="handleRemove('childDataForm')">删除</el-button>
            </div>
          </div>
          <el-descriptions
            :data-options="JSON.stringify({ 'TableName': 'asset_change', 'form': 'childDataForm', 'ParentTableName': 'asset_management'})"
            :column="2" size="large" border v-for="(item,index) in childDataForm.filter(item => item.Row_Status != '1')"
            :key="index">
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">变动类型</div>
              </template>
              <el-select clearable v-model.trim="item.Change_Type" placeholder="请选择变动类型" filterable
                style="width: 100%">
                <el-option v-for="(item,index) in Change_Type" :key="index" :label="item.label" :value="item.value"></el-option>
              </el-select>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">变动金额</div>
              </template>
              <el-input ref="personal_information" v-model="item.Change_Amount" class="borderless-input"
                placeholder="请输入发生金额" />
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">资产变动日期</div>
              </template>
              <el-date-picker v-model="item.Change_Date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                class="borderless-input" type="date" placeholder="请选择资产变动日期" size="large"></el-date-picker>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">资产变动说明</div>
              </template>
              <el-input ref="grid_member" v-model="item.Change_Description" class="borderless-input" placeholder="请输入资产变动说明" />
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">附件</div>
              </template>
              <yl-upload drag v-model="item.Attachment"></yl-upload>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">经办人</div>
              </template>
              <el-select clearable v-model.trim="item.Handler_SerialNumber" placeholder="请选择经办人" filterable
                style="width: 100%">
                <el-option v-for="(item,index) in personal_information" :key="index" :label="item.Personal_Name"
                  :value="item.ID_Card_Number"></el-option>
              </el-select>
            </el-descriptions-item>
          </el-descriptions>
        </div> -->
      </div>

    </div>
    <footer class="botton-ann">
      <el-button @click="goBack">返回</el-button>
      <el-button type="primary" plain @click="handleSubmit" :loading="loading">提交</el-button>
    </footer>
  </div>
</body>
<script src="../../../utils/utils.js"></script>
<script src="../../../config/config.js"></script>
<script src="../../../utils/mixins.js"></script>
<script src="../../../yl/vue.js"></script>
<script src="../../../yl/index.js"></script>
<script src="../../../yl/zh-cn.mjs"></script>
<script src="../../../yl/index.iife.min.js"></script>
<script src="../../../yl/jquery.min.js"></script>
<script src="../../../utils/jquery.cookie.js"></script>
<script src="../../../yl/jquery.easyui.min.js"></script>
<script src="../../../yl/jquery.easyui.mobile.js"></script>
<script src="../../../yl/moment.min.js"></script>
<script src="../../../api/request.js"></script>
<script src="./js/add.js"></script>

</html>